
package hasthi.manager;

import java.util.Hashtable;
import java.util.Map;

import org.apache.xmlbeans.XmlObject;

public class ActionRepository {
    private ActionRepository parentRepository;
    private Map<String,XmlObject> repo = new Hashtable<String,XmlObject>();
    
    public ActionRepository(ActionRepository parentRepository){
        this.parentRepository = parentRepository;
    }
    
    public XmlObject getAction(String actionID){
        XmlObject action = repo.get(actionID);
        if(action == null &&  parentRepository != null){
            action = parentRepository.getAction(actionID);
        }
        return action;
    }
}

